import scrapy


class LoginSpider(scrapy.Spider):
    name = 'login'
    allowed_domains = ['ehei.top']
    start_urls = ['http://www.ehei.top/blog/admin/login.php']

    def parse(self, response):
        postData = {
            "name" : 'admin',
            "password": 'helzcxg@xbcmsbh',
            'referer' : 'http://www.ehei.top/blog/admin/'
        }
        yield scrapy.FormRequest(
            "http://www.ehei.top/blog/index.php/action/login",
            formdata = postData,
            callback = self.logined
        )
    def logined(self, response):
        print(dir(response))